package at.ac.thornwishstalon.ocrapp.main.fragments;

import android.app.Activity;
import android.app.Dialog;
import android.app.DialogFragment;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import at.ac.thornwishstalon.ocrapp.R;

public class OcrappDialogFragment extends DialogFragment {
	private Activity act;
	
	public static OcrappDialogFragment newInstance() {
		OcrappDialogFragment frag = new OcrappDialogFragment();
        
		
        return frag;
    }
	public void setActivity(Activity act){
		this.act=act;
	}
	
	@Override
	public Dialog onCreateDialog(Bundle savedInstanceState) {
			ProgressDialog dialog = new ProgressDialog(act, ProgressDialog.STYLE_SPINNER);
		    
		    dialog.setTitle(R.string.tess_task_progressbar_title);
		    dialog.setMessage(getString(R.string.tess_task_progressbar_message));
		    dialog.setIndeterminate(true);
		    dialog.setCancelable(false);
		    // etc...
		    return dialog;
	}
	
	@Override
	public void onDismiss(DialogInterface dialog) {
		super.onDismiss(dialog);
		
		Log.d("DIALOGFRAGMENT", "dismissed");
	}
	

	
	
}
